/******************************************************************************
 * @File name   :      IMemberPackageService.java
 *
 * @Author      :      JIZHANGS
 *
 * @Date        :      Jul 28, 2015
 *
 * @Copyright Notice: 
 * Copyright (c) 2015 Capgemini, Inc. All  Rights Reserved.
 * This software is published under the terms of the Capgemini Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who         Version        Comments
 * Jul 28, 2015 9:29:12 AM        JIZHANGS     1.0            Initial Version
 *****************************************************************************/
package com.cap.bts.crmdp.dealer.mars.service;

import java.util.List;

import com.cap.bts.crmdp.dealer.purchase.domain.MemberPackageInfo;
import com.cap.bts.crmdp.dealer.purchase.dto.MemberPackageInfoSubmitDto;
import com.cap.bts.crmdp.dealer.redemption.dto.MemberAndDealerInfoDto;
import com.cap.bts.crmdp.dealer.redemption.dto.MemberPackagesReportDto;
import com.cap.bts.crmdp.webservice.dto.WSCrmCancelOrderResultDto;
import com.cap.bts.crmdp.webservice.dto.WSCrmOrderDto;
import com.cap.bts.crmdp.webservice.dto.WSCrmSettlementDto;
import com.cap.bts.crmdp.webservice.dto.WSCrmSettlementResultDto;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.service.IBaseService;

/**
 *
 */
public interface IMarsMemberPackageService extends IBaseService{
    /**
     * 
     * @Date        :      Aug 28, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public Boolean checkMemberPackageExsit(MemberPackageInfoSubmitDto dto) throws AppException;
    
    /**
     * 
     * @Date        :      Nov 16, 2015
     * @param packageNumber
     * @return
     * @throws AppException
     */
    public MemberPackageInfo getMemberPackageInfoByPackageNumber(String packageNumber) throws AppException;
    public MemberPackageInfo getPackageInfoByPackageNumber(String packageNumber) throws AppException;

    /**
     * 
     * @Date        :      Aug 28, 2015
     * @param mpi
     * @throws AppException
     */
    public void updateMemberPackageInfo(MemberPackageInfo mpi) throws AppException;
    
    /**
     * 
     * @Date        :      Aug 28, 2015
     * @param mpi
     * @throws AppException
     */
    public void updateMemberPackageInfoById(MemberPackageInfo mpi) throws AppException;
    
    /**
     * processExpiredMemberPackage
     * @throws AppException
     */
    public void processExpiredMemberPackage() throws AppException;
    
    /**
     * processNotificationBeforeActivication
     * @throws AppException
     */
    public void processNotificationBeforeActivication() throws AppException;
    /**
     * @Date        :      2015年9月5日
     * @param dealerId
     * @param memberId
     * @return
     * @throws AppException
     */
    public List<MemberPackageInfo> getMemberPackageInfoByActiveDealerIdAndActiveMemberId(Long dealerId, Long memberId) throws AppException;
    /**
     * @Date        :      2015年9月6日
     * @param memberPackageInfo
     * @throws AppException
     */
    public void updateMemberPackageInfoByMemberPackageInfo(MemberPackageInfo memberPackageInfo, Long newMemberId) throws AppException;
    
    /**
    * 
    * @Date        :      Oct 16, 2015
    * @param prefix
    * @return
    * @throws AppException
    */
    public MemberPackageInfo getMaxMemberPackageInfoByNonPhysicalCardPrefix(String prefix) throws AppException;
    
    
    /**
     * 
     * @Date        :      Oct 16, 2015
     * @param MemberPackageInfo
     * @return
     * @throws AppException
     */
     public WSCrmCancelOrderResultDto cancelOrder(WSCrmOrderDto dto);
     
     
     /**
      * 
      * @Date        :      Oct 16, 2015
      * @param MemberPackageInfo
      * @return
      * @throws AppException
      */
      public WSCrmSettlementResultDto settlement(WSCrmSettlementDto dto);

      public List<MemberPackagesReportDto> getPackageListForReportByMember(Long memberId, Long carId) throws AppException;
    
      List<MemberAndDealerInfoDto> getMemberAndDealerInfoDtoByMARSIdAndDearId(Long dealerId, String marsMemberId)
  			throws AppException;
      
      
      public Long getUsedRedemptionCountByPackageNumber(String packageNumber) throws AppException ;
      
      
      public void deleteOrderGift(Long activeMemberId)throws AppException ;
}
